package sliver.entity;

import java.io.Serializable;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "box_machine")
@Access(AccessType.FIELD)
public class Machine implements Serializable{

	private static final long serialVersionUID = -2121594858216693L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private Long id;
	
	@Column(name = "name")
	private String name;
	
	@Column(name = "balance")
	private Double balance;
	
	@Column(name = "e_balance")
	private Double elecBlance;
	
	@Column(name = "init_Balance")
	private Double initBalance;
	
	@Column(name = "one_yuan_num")
	private Long oneYuanNum;
	
	@Column(name = "five_yuan_num")
	private Long fiveYuanNum;
	
	@Column(name = "ten_yuan_num")
	private Long tenYuanNum;
	
	@Column(name = "twenty_yuan_num")
	private Long twentyYuanNum;
	
	@Column(name = "fifty_yuan_num")
	private Long fiftyYuanNum;
	
	@Column(name = "state")
	private Integer state;
	
	@ManyToOne
	@JoinColumn(name = "shopper_id")
	private Shopper shopper;
	
	public Machine(){
		
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public Double getElecBlance() {
		return elecBlance;
	}

	public void setElecBlance(Double eBlance) {
		this.elecBlance = eBlance;
	}
	
	public Double getInitBalance() {
		return initBalance;
	}

	public void setInitBalance(Double initBalance) {
		this.initBalance = initBalance;
	}

	public Long getOneYuanNum() {
		return oneYuanNum;
	}

	public void setOneYuanNum(Long oneYuanNum) {
		this.oneYuanNum = oneYuanNum;
	}

	public Long getFiveYuanNum() {
		return fiveYuanNum;
	}

	public void setFiveYuanNum(Long fiveYuanNum) {
		this.fiveYuanNum = fiveYuanNum;
	}

	public Long getTenYuanNum() {
		return tenYuanNum;
	}

	public void setTenYuanNum(Long tenYuanNum) {
		this.tenYuanNum = tenYuanNum;
	}

	public Long getTwentyYuanNum() {
		return twentyYuanNum;
	}

	public void setTwentyYuanNum(Long twentyYuanNum) {
		this.twentyYuanNum = twentyYuanNum;
	}

	public Long getFiftyYuanNum() {
		return fiftyYuanNum;
	}

	public void setFiftyYuanNum(Long fiftyYuanNum) {
		this.fiftyYuanNum = fiftyYuanNum;
	}
	
	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Shopper getShopper() {
		return shopper;
	}

	public void setShopper(Shopper shopper) {
		this.shopper = shopper;
	}
}
